self.onmessage = function(e) {
  const { text } = e.data;
  const lines = text.split(/\r?\n/).filter(line => line.trim());
  const dataArr = [];
  for (let i = 0; i < lines.length; i++) {
    try {
      dataArr.push(JSON.parse(lines[i]));
    } catch {}
  }
  self.postMessage({ dataArr });
};